import org.java.test.Account;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-3-28 0028 下午 7:19
 */
public class AddMoneyThread implements Runnable{
    private Account account; // 存⼊账户
    private double money; // 存⼊⾦额

    public AddMoneyThread(Account account, double money) {
        this.account = account;
        this.money = money;
    }

    @Override
    public void run() {
        account.addMoney(money);
    }
}
